1. Field of the Invention
This invention relates to a numerical control system for controlling a machine such as a machine tool by a numerical control section and a programmable controller section. More particularly, the invention relates to a numerical control system adapted to rapidly execute processing of miscellaneous functions.
2. Related Art
Machines controlled by a numerical control unit (CNC) having an internal microcomputer are becoming more popular and great strides are being made in automation and conservation of energy in the machining field.
FIG. 4 is a block diagram illustrating the general features of a numerical control system for a machine tool. In the Figure, numeral 1 denotes a numerical control (NC) section constructed about a microcomputer for outputting numerical control signals based on a machining program created by editing NC command data read in from an NC tape of a predetermined format. Numeral 2 designates a programmable controller (PC) section for sequentially controlling a magnetics circuit 6 of a machine tool based on a control signal produced by the NC section 1. The PC section consists of a microcomputer having a central processor, a memory for storing programs and data and the like, etc. Numeral 3 denotes an input/output circuit connected to a machine control panel 5, the magnetics circuit 6 and an M-, S and T-function executing unit 7. Connected to the M-, S-, and T-function executing unit 7 via a spindle amplifier is a spindle motor 8. The system is adapted to specify the number of revolutions of the machine tool spindle (S-function) or the number of a tool to be changed (T-function), and to specify miscellaneous function (M-function) instructions for various operations to be performed by the machine tool so that the machine tool will execute these operations. Numeral 9 denotes a velocity control unit for exercising control in such a manner that the velocity of a feed motor 10 will be controlled by a velocity command issued by the NC section 1.
Though the primary task of a machine tool is machining such as cutting and turning, there are many miscellaneous tasks which a machine tool carries out to perform such machining. For instance, these tasks include loading and unloading of workpieces, starting and stopping the spindle motor, turning a cutting oil flow on and off and selecting tools. These miscellaneous tasks are dealt with by the PC section 2 based on a miscellaneous function instruction signal commanded by a two-digit numerical value which follows an M code outputted by the NC section 1.
FIG. 5 is a view for describing a machine interface for outputting miscellaneous function instruction signals read out from the NC section 1 to the PC section 2. M-code signals M11 through M28 specified by two binary coded decimal (BCD) digits and a code read command signal MF are sent from the NC section 1 to the PC section 2. The M-code signals are decoded in the PC section 2, so that the required actuators are driven in the sequence indicated in order that the commanded operaton may be performed. When the operation is completed, a completion signal FIN is sent to the NC section 1. The NC section 1 responds by turning off the code read command signal MF. The NC section 1 follows this by proceeding to the NC command of the next block through a sequence in which the completion signal in turned off FIN is turned off and then the M-code signal.
A time chart for this operation is shown in FIG. 6. FIG. 7 is an explanatory view illustrating examples of miscellaneous function instructions (hereafter referred to simply as codes) as well as functions corresponding thereto. The term "unassigned" indicates codes which allow new functions to be freely assigned and used for machine tools.
A major feature of a CNC constructed as described above is that it shortens machining time for a single workpiece in numerical control for automatic equipment or for line use. In a conventional numerical control system, however, if an M-function word specifies two or more M codes in one block of a machining program, only the last M code is treated as being effective. With a CNC of this type, only one M-function can be specified per block, following the sequence number of the conventional NC tape format. Accordingly, the prescribed machining of a workpiece begins after all of the necessary miscellaneous functions have been set in the PC section upon being read out of the NC section one at a time for each block. A problem that results is that machining time cannot be reduced.